package com.haizhi.crm.sys.auth.dao;

import com.haizhi.crm.sys.auth.model.RelationDo;
import com.haizhi.crm.sys.auth.model.RelationVo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by yangyijun on 2018/5/21.
 */
@Repository
public interface RelationDao extends JpaRepository<RelationDo, Long> {
    @Query(value = "select new com.haizhi.crm.sys.auth.model.RelationVo(id,name,remark) from RelationDo" )
    List<RelationVo> list();
}
